1. Field of the Invention
The present invention is related to saving power in computer systems.
2. Background
Many systems include a specialized processing device, such as, for example, a graphics processing unit (GPU), in addition to a central processing unit (CPU). Some processing systems include multiple of these specialized processing devices to allow for performance gains through parallel processing of tasks. Exemplary tasks may include, for its example, video processing, graphics processing, physics simulations and the like. A graphics-intensive game may be running that requires or can benefit from having the additional processing power provided by multiple active GPUs. Other applications, however, may not benefit from such increased processing power. When only these other applications are being run on the system, the active available graphics processing power may be reduced This can be accomplished by reducing the number or GPUs or by switching from one GPU to another with lower capabilities.
GPUs are typically coupled to a central processing unit (CPU) through a bus, e.g., a peripheral component interconnect (PCI) or PCI express bus and may be included in another device (e.g., a northbridge device). Alternatively, a GPU or other type of core or processor may be included as part of the same package or same die as a CPU
An operating system, running on a CPU, usually checks device presence on the bus. When a device does not respond to the configuration cycles, e.g., when the device is turned off, the operating system can cause complex processes (e.g., plug-and-play processes) to be executed that can have negative effects on the user experience. Thus, powering on and off devices is often operating system dependent. To prevent these negative effects, many graphics systems keep GPUs powered (even those that are not being used) so that they can respond to configuration cycles generated by the CPU. Keeping unused GPUs powered, however, can result in inefficient power usage and, in mobile systems, decreased battery life.
Improvements in power consumption can be achieved by shutting down one or more processing devices when multiple of a particular type of processing device are available in a system. Secondary processing devices that are shutdown can remain in that state as long as the primary processing device of that type can service the workload in the system. However, when the primary one of a particular type of processing devices is shutdown during an idle period, more complexities arise. For example, for a primary processing device of a particular type, it is challenging to determine when that device has been idle for a long enough duration so as to efficiently cause it to shutdown, as well as to enable the system to reactivate that device for any new work that requires the type of processing performed by processing devices of that type, For example, when the primary GPU of a system is shutdown, in order to ensure a high level of system performance, the primary GPU must be brought back to an operational state whenever there is a work request for a GPU. This presents challenges in addition to the challenges posed by shutting down secondary ones of those processing devices.
What is needed, then, are improved methods and systems that allow processing devices to be placed in reduced-power states.